package com.openapi.openapi.controller;


import com.openapi.openapi.controller.test.TestParam;
import com.openapi.openapi.vo.PageResData;
import com.openapi.openapi.vo.ResData;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/alive")
public class AliveController extends BaseController {
    @RequestMapping("test")
    public ResData<TestParam> test(@RequestBody TestParam param) {
        return new ResData<>(param);
    }
    @RequestMapping("page_test")
    public PageResData<String> pageTest() {
        List<String> items = new ArrayList<>();
        items.add("a");
        return new PageResData<>(items,1,100);
    }
}
